

set more off

preserve

putexcel set tab3.xlsx, sheet(sheet1) replace

putexcel A1 = "Table 3:  Descriptive statistics of sampled voters of Sorsogon City"




putexcel A2 = "Variable"
putexcel A3 = "Male = 1"
putexcel A4 = "Years of age"
putexcel A5 = "Religion is Catholic = 1"
putexcel A6 = "Number of voting"
putexcel A7 = "household members"
putexcel A8 = "Marital status"
putexcel A9 = "Single"
putexcel A10 = "Married"
putexcel A11 = "Widowed"
putexcel A12 = "Domestic partnership"
putexcel A13 = "Separated"
putexcel A14 = "Employment status"
putexcel A15 = "Choose not to work"
putexcel A16 = "Retired"
putexcel A17 = "Student"
putexcel A18 = "Unemployed and"
putexcel A19 = "looking for a job"
putexcel A20 = "Working full time"
putexcel A21 = "Working part time"
putexcel A22 = "Education"
putexcel A23 = "Some elementary to"
putexcel A24 = "no schooling"
putexcel A25 = "Elementary"
putexcel A26 = "Some high school"
putexcel A27 = "High school"
putexcel A28 = "Some college"
putexcel A29 = "College up"
putexcel A31 = "Vocational"
putexcel A32 = "Migrant status"
putexcel A33 = "Born here"
putexcel A34 = "Migrated as a child"
putexcel A35 = "Migrated as an adult"

use "VoterLevelData.dta",clear

***Generate respondent demographics and controls

sum male
return list
putexcel B3 = `r(N)'
putexcel C3 = `r(mean)'
putexcel D3 = `r(sd)'
putexcel E3 = `r(min)'
putexcel F3 = `r(max)'

sum age 
return list
putexcel B4 = `r(N)'
putexcel C4 = `r(mean)'
putexcel D4 = `r(sd)'
putexcel E4 = `r(min)'
putexcel F4 = `r(max)'

sum catholic
return list
putexcel B5 = `r(N)'
putexcel C5 = `r(mean)'
putexcel D5 = `r(sd)'
putexcel E5 = `r(min)'
putexcel F5 = `r(max)'

sum hh_voting_mems 
return list
putexcel B7 = `r(N)'
putexcel C7 = `r(mean)'
putexcel D7 = `r(sd)'
putexcel E7 = `r(min)'
putexcel F7 = `r(max)'

sum single
return list
putexcel B9 = `r(N)'
putexcel C9 = `r(mean)'
putexcel D9 = `r(sd)'
putexcel E9 = `r(min)'
putexcel F9 = `r(max)'

sum married
return list
putexcel B10 = `r(N)'
putexcel C10 = `r(mean)'
putexcel D10 = `r(sd)'
putexcel E10 = `r(min)'
putexcel F10 = `r(max)'

sum widowed 
return list
putexcel B11 = `r(N)'
putexcel C11 = `r(mean)'
putexcel D11 = `r(sd)'
putexcel E11 = `r(min)'
putexcel F11 = `r(max)'

sum dom_partnership 
return list
putexcel B12 = `r(N)'
putexcel C12 = `r(mean)'
putexcel D12 = `r(sd)'
putexcel E12 = `r(min)'
putexcel F12 = `r(max)'

sum separated
return list
putexcel B13 = `r(N)'
putexcel C13 = `r(mean)'
putexcel D13 = `r(sd)'
putexcel E13 = `r(min)'
putexcel F13 = `r(max)'

sum employ_stat1
return list
putexcel B15 = `r(N)'
putexcel C15 = `r(mean)'
putexcel D15 = `r(sd)'
putexcel E15 = `r(min)'
putexcel F15 = `r(max)'
 
sum employ_stat2 
return list
putexcel B16 = `r(N)'
putexcel C16 = `r(mean)'
putexcel D16 = `r(sd)'
putexcel E16 = `r(min)'
putexcel F16 = `r(max)'

sum employ_stat3 
return list
putexcel B17 = `r(N)'
putexcel C17 = `r(mean)'
putexcel D17 = `r(sd)'
putexcel E17 = `r(min)'
putexcel F17 = `r(max)'

sum employ_stat4
return list
putexcel B19 = `r(N)'
putexcel C19 = `r(mean)'
putexcel D19 = `r(sd)'
putexcel E19 = `r(min)'
putexcel F19 = `r(max)'

sum employ_stat5 
return list
putexcel B20 = `r(N)'
putexcel C20 = `r(mean)'
putexcel D20 = `r(sd)'
putexcel E20 = `r(min)'
putexcel F20 = `r(max)'

sum employ_stat6 
return list
putexcel B21 = `r(N)'
putexcel C21 = `r(mean)'
putexcel D21 = `r(sd)'
putexcel E21 = `r(min)'
putexcel F21 = `r(max)'

sum some_elementary
return list
putexcel B24 = `r(N)'
putexcel C24 = `r(mean)'
putexcel D24 = `r(sd)'
putexcel E24 = `r(min)'
putexcel F24 = `r(max)'

sum elementary
return list
putexcel B25 = `r(N)'
putexcel C25 = `r(mean)'
putexcel D25 = `r(sd)'
putexcel E25 = `r(min)'
putexcel F25 = `r(max)'

sum some_highschool
return list
putexcel B26 = `r(N)'
putexcel C26 = `r(mean)'
putexcel D26 = `r(sd)'
putexcel E26 = `r(min)'
putexcel F26 = `r(max)'

sum highschool
return list
putexcel B27 = `r(N)'
putexcel C27 = `r(mean)'
putexcel D27 = `r(sd)'
putexcel E27 = `r(min)'
putexcel F27 = `r(max)'

sum some_college
return list
putexcel B28 = `r(N)'
putexcel C28 = `r(mean)'
putexcel D28 = `r(sd)'
putexcel E28 = `r(min)'
putexcel F28 = `r(max)'

sum college
return list
putexcel B29 = `r(N)'
putexcel C29 = `r(mean)'
putexcel D29 = `r(sd)'
putexcel E29 = `r(min)'
putexcel F29 = `r(max)'

sum vocatiol 
return list
putexcel B31 = `r(N)'
putexcel C31 = `r(mean)'
putexcel D31 = `r(sd)'
putexcel E31 = `r(min)'
putexcel F31 = `r(max)'

sum bornhere 
return list
putexcel B33 = `r(N)'
putexcel C33 = `r(mean)'
putexcel D33 = `r(sd)'
putexcel E33 = `r(min)'
putexcel F33 = `r(max)'

sum childmigrant 
return list
putexcel B34 = `r(N)'
putexcel C34 = `r(mean)'
putexcel D34 = `r(sd)'
putexcel E34 = `r(min)'
putexcel F34 = `r(max)'

sum adultmigrant
return list
putexcel B35 = `r(N)'
putexcel C35 = `r(mean)'
putexcel D35 = `r(sd)'
putexcel E35 = `r(min)'
putexcel F35 = `r(max)'

restore
